package com.wust.demo1.action;

import java.util.List;

import com.wust.demo1.module.Student;
import com.wust.demo1.service.StudentService;

public class TestStruts2 {
	private StudentService studentService;
	private List<Student> students;
	public String helloStruts2(){
		students = studentService.getAllStudents();
		for(Student s:students){
			System.out.println(s.getName());
		}
		return "success";
	}
	
	
	public StudentService getStudentService() {
		return studentService;
	}
	public void setStudentService(StudentService studentService) {
		this.studentService = studentService;
	}
	public List<Student> getStudents() {
		return students;
	}
	public void setStudents(List<Student> students) {
		this.students = students;
	}
	
}
